<?php get_header();?>

<div id="items">
<?php  $count = 1; ?>
	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
     <?php  
	//Recupero dei campi personalizzati dell'articolo
	//Recupero l'immagine dal campo personalizzato
	$info_articolo = array();
	$info_articolo['copertina'] = get_meta('copertina');
	$info_articolo['locandina'] = get_meta('locandina');
	$info_articolo['flickr_tag'] = get_meta('flickr_tag');
	$info_articolo['incontro'] = get_meta('incontro');
	$info_articolo['fotografie'] = get_meta('foto');
	$info_articolo['email'] = get_meta('email_ref');
	$info_articolo['video'] = get_meta('video');

?>
        
       <?php if ($count ==1): ?>
       <div class="first-item" style="float:left; height:330px; width:100%; padding:0 20px">
            <div id="video-box" style="float:left;">
            <?php	echo $info_articolo['video']; ?>
           	</div>
	    <?php else: ?>
        <div class="item">
        <a href="<?php the_permalink(); ?>" title="Apri la scheda del video" >
        <img src="<?php echo $info_articolo['locandina']; ?>" alt="Locandina Articolo <?php the_title(); ?>" />
        </a>
        <?php endif; ?>
        
        <div class="<?php if ($count == 1) echo 'first-' ?>content">
        <h2><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></h2>
        <p><?php the_content(''); ?> </p>
        </div>
        <div class="comments-link">
        <p><a href="<?php the_permalink() ?>#comments" title="Commenti a questo articolo"><?php comments_number('0', '1', '%'); ?></a></p>
        </div>
      <?php $count++;?>
        </div>
    <?php endwhile; else: ?>
    <?php endif; ?>
    <div id="navi"><?php next_posts_link('<span class="navforward"></span>') ?><?php previous_posts_link('<span class="navback"></span>') ?></div>
</div>

<?php //get_sidebar(); ?>

<?php get_footer(); ?>